#ifndef LOG_SAVE_H
#define LOG_SAVE_H

#include <QObject>


typedef struct dvc_info{
    char head;
    uint32_t identifier;
    uint8_t mac[6];
    char tail;
}s_dvc_info_t;

QByteArray get_used_info(void);
uint8_t Duplicate_check(int id);

class Log_save :public QObject
{
    Q_OBJECT

private:
    QString File_path;

public:
    Log_save(QObject *parent = nullptr,QString FilePath = "log_info.txt");

    void  load_last_info_to_lineEdit(void);
    uint8_t  write_log_info_toFile(QString log);

signals:
    void Update_log_signal(QString log);
private slots:
    void Save_log_cb(QString log);
};

#endif // LOG_SAVE_H
